import serviceAxios from "@/http/index";


export const registerUser = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/register",
        method: "post",
        data:params,
    });
}

export const getCaptcha = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/smsSend",
        method: "post",
        data: params,
    });
}

export const userLogin = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/login",
        method: "post",
        data: params,
    });
}
export const userMobileLogin = (params) => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/mobilelogin",
        method: "post",
        data: params,
    });
}

export const userLoginOut = () => {
    return serviceAxios({
        url: "addons/ldcms/api.v1/logout",
        method: "post",
    });
}

export const setUserProfile = (params) =>{
    return serviceAxios({
        url: "addons/ldcms/api.v1/profile",
        method: "post",
        data:params,
        useTokenAuthorization:true
    });
}
export const getUserProfile = () =>{
    return serviceAxios({
        url: "addons/ldcms/api.v1/profile",
        method: "get",
    });
}

export const sendMessage = (params) =>{
    return serviceAxios({
        url: "addons/ldcms/api.v1/diyform?type=message",
        method: "post",
        data:params,
        useTokenAuthorization:true
    });
}